package com.gpstracker.services;

import com.gpstracker.db.MyDatabase;
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.util.Log;

public class DeleteService extends Service{

	private static final String TAG = "DELETE_SERVICE";
	MyDatabase db;
	
	@Override
	public void onCreate() {
		Log.i(TAG, "ON CREATE");
		db=new MyDatabase(getApplicationContext());
		db.open();
		
		db.deleteAll();
		this.stopSelf();
	}

	@Override
	public void onDestroy() {
		Log.i(TAG, "ON DESTROY");
		db.close();
	}

	@Override
	public IBinder onBind(Intent intent) {
		// TODO Auto-generated method stub
		return null;
	}

}
